package com.sugar.MultiThread.a13waitandnotify;

import com.sugar.MultiThread.a12deadlock.MyThread;

/**
 * @author felix
 * @date 2025/2/26 09:33
 */
public class ThreadDemo {
    public static void main(String[] args) {
        /*
         *
         *    需求：完成生产者和消费者（等待唤醒机制）的代码
         *         实现线程轮流交替执行的效果
         *
         * */

        Cook cook = new Cook();
        Foodie foodie = new Foodie();

        cook.setName("厨子");
        foodie.setName("吃货");

        cook.start();
        foodie.start();
    }
}
